package com.atguigu.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created with IntelliJ IDEA.
 * ClassName: CommonResult
 * Package: com.atguigu.springcloud.entities
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-08-28
 * Time: 21:22
 */

@Data
@AllArgsConstructor //全参构造
@NoArgsConstructor //空参构造
public class CommonResult<T> {

    //统一返回结构
    private Integer code;
    private String message;
    private T data;

    //全参 和 空参都有了 定义一个两个参数的构造函数
    public CommonResult(Integer code,String message){
        this(code,message,null);
    }

}
